package controller;

import java.util.List;

import model.KlsCliente;
import model.KlsZonaEntrega;

import org.hibernate.HibernateException;
import org.hibernate.Session;

import util.HibernateUtil;

public class KlsClienteManager {
	
	
	
	
	public List<KlsCliente> list() {
        
        Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        session.beginTransaction();
        List<KlsCliente> clientes = null;
        try {
             
            clientes = session.createQuery("from KlsCliente").list();
            session.getTransaction().commit();
        }
        catch (HibernateException e) {
            e.printStackTrace();
            session.getTransaction().rollback();
        
        }
        
        return clientes;
    }

}
